package com.ruoyi.user.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 视频推荐系统配置
 * 
 * @author xjj
 * @date 2025-09-23
 */
@Configuration
@ConfigurationProperties(prefix = "video.recommend")
public class VideoRecommendConfig {
    
    /**
     * 是否启用Redis缓存推荐
     */
    private boolean enableRedisCache = true;
    
    /**
     * 个性化推荐缓存时间（秒）
     */
    private long personalizedCacheTime = 900;
    
    /**
     * 热门榜单缓存时间（秒）
     */
    private long hotCacheTime = 300;
    
    /**
     * 附近视频缓存时间（秒）
     */
    private long nearbyCacheTime = 600;
    
    /**
     * 默认推荐数量
     */
    private int defaultSize = 20;
    
    /**
     * 最大搜索半径（公里）
     */
    private int maxRadius = 50;

    // Getters and Setters
    public boolean isEnableRedisCache() {
        return enableRedisCache;
    }

    public void setEnableRedisCache(boolean enableRedisCache) {
        this.enableRedisCache = enableRedisCache;
    }

    public long getPersonalizedCacheTime() {
        return personalizedCacheTime;
    }

    public void setPersonalizedCacheTime(long personalizedCacheTime) {
        this.personalizedCacheTime = personalizedCacheTime;
    }

    public long getHotCacheTime() {
        return hotCacheTime;
    }

    public void setHotCacheTime(long hotCacheTime) {
        this.hotCacheTime = hotCacheTime;
    }

    public long getNearbyCacheTime() {
        return nearbyCacheTime;
    }

    public void setNearbyCacheTime(long nearbyCacheTime) {
        this.nearbyCacheTime = nearbyCacheTime;
    }

    public int getDefaultSize() {
        return defaultSize;
    }

    public void setDefaultSize(int defaultSize) {
        this.defaultSize = defaultSize;
    }

    public int getMaxRadius() {
        return maxRadius;
    }

    public void setMaxRadius(int maxRadius) {
        this.maxRadius = maxRadius;
    }
}

